home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 60.zip
/
BS1 part 60
/
Highspeed pascal.adf
/
Interface
/
Console.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-01-16
|
3KB
|
128 lines
Unit Console;
Interface
Uses Intuition, Graphics, Keymap, Input, Exec;
Type
pWindow = ^tWindow;
pTextFont = ^tTextFont;
tConUnit = Record
cu_MP: tMsgPort;
cu_Window: pWindow;
cu_XCP: Integer;
cu_YCP: Integer;
cu_XMax: Integer;
cu_YMax: Integer;
cu_XRSize: Integer;
cu_YRSize: Integer;
cu_XROrigin: Integer;
cu_YROrigin: Integer;
cu_XRExtant: Integer;
cu_YRExtant: Integer;
cu_XMinShrink: Integer;
cu_YMinShrink: Integer;
cu_XCCP: Integer;
cu_YCCP: Integer;
cu_KeyMapStruct: tKeyMap;
cu_TabStops: Array [0..79] of Integer;
cu_Mask: ShortInt;
cu_FgPen: ShortInt;
cu_BgPen: ShortInt;
cu_AOLPen: ShortInt;
cu_DrawMode: ShortInt;
cu_AreaPtSz: ShortInt;
cu_AreaPtrn: Pointer;
cu_Minterms: Array [0..7] of ShortInt;
cu_Font: pTextFont;
cu_AlgoStyle: ShortInt;
cu_TxFlags: ShortInt;
cu_TxHeight: Integer;
cu_TxWidth: Integer;
cu_TxBaseline: Integer;
cu_TxSpacing: Integer;
cu_Modes: Array [0..2] of ShortInt;
cu_RawEvents: Array [0..2] of ShortInt;
End;
pLibrary = ^tLibrary;
pInputEvent = ^tInputEvent;
pKeyMap = ^tKeyMap;
pDevice = ^tDevice;
Var
ConsoleDevice: pLibrary;
Const
SGR_CLR2 = $20;
SGR_CLR3 = $21;
SGR_CLR4 = $22;
SGR_CLR5 = $23;
SGR_CLR6 = $24;
SGR_CLR7 = $25;
SGR_WHITE = $25;
SGR_BLACKBG = $28;
CD_ASKDEFAULTKEYMAP = $B;
CD_SETKEYMAP = $A;
TBC_HCLRTABSALL = $3;
SGR_BOLD = $1;
CTC_HCLRTABSALL = $5;
TBC_HCLRTAB = $0;
SGR_NEGATIVE = $7;
CTC_HCLRTAB = $2;
SGR_BLUE = $22;
MAXTABS = $50;
CD_SETDEFAULTKEYMAP = $C;
SGR_CYAN = $24;
CTC_HSETTAB = $0;
SGR_GREENBG = $2A;
SGR_MAGENTA = $23;
SGR_CLR0BG = $28;
SGR_YELLOWBG = $2B;
SGR_CLR1BG = $29;
SGR_CLR2BG = $2A;
SGR_CLR3BG = $2B;
SGR_CLR4BG = $2C;
PMB_ASM = $15;
SGR_CLR5BG = $2D;
SGR_DEFAULT = $27;
SGR_CLR6BG = $2E;
SGR_CLR7BG = $2F;
PMB_AWM = $16;
SGR_RED = $1F;
SGR_WHITEBG = $2F;
DSR_CPR = $6;
SGR_BLUEBG = $2C;
SGR_CYANBG = $2E;
SGR_ITALIC = $3;
SGR_MAGENTABG = $2D;
SGR_PRIMARY = $0;
SGR_BLACK = $1E;
SGR_DEFAULTBG = $31;
SGR_REDBG = $29;
SGR_UNDERSCORE = $4;
SGR_GREEN = $20;
M_ASM = '>1';
M_AWM = '?7';
SGR_CLR0 = $1E;
CD_ASKKEYMAP = $9;
SGR_YELLOW = $21;
SGR_CLR1 = $1F;
M_LNM = $14;
Function CDInputHandler
(events: pInputEvent;
device: pDevice): pInputEvent;
Function RawKeyConvert
(events: pInputEvent;
buffer: pShortInt;
length: LongInt;
keyMap: pKeyMap): LongInt;
End.